'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace OLE

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.OLE.ITypeInfo)> _
    Public Interface ITypeInfo
        <PreserveSig()> Function GetTypeAttr(<Out()> ByRef pTypeAttr As TypeAttr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetTypeComp(<Out()> ByRef ppTComp As ITypeComp) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFuncDesc(ByVal index As UInteger, <Out()> ByRef pFuncDesc As FuncDesc) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetVarDesc(ByVal index As UInteger, <Out()> ByRef pVarDesc As VarDesc) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetNames(ByVal memid As Integer, <Out(), MarshalAs(UnmanagedType.LPArray, ArraySubType:=UnmanagedType.BStr)> ByVal rgBstrNames() As String, ByVal cMaxNames As UInteger, <Out()> ByVal pcNames As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetRefTypeOfImplType(ByVal index As UInteger, <Out()> ByVal pRefType As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetImplTypeFlags(ByVal index As UInteger, ByRef pImplTypeFlags As ImplTypeFlags) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetIDsOfNames(<MarshalAs(UnmanagedType.LPArray, ArraySubType:=UnmanagedType.BStr)> ByRef rgszNames() As String, ByVal cNames As UInteger, ByVal pMemId As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Invoke(<MarshalAs(UnmanagedType.IUnknown)> ByRef pvInstance As Object, ByVal memid As Integer, ByVal wFlags As DispatchFlags, ByRef pDispParams As DispParams, <Out()> ByRef pVarResult As IntPtr, <Out()> ByRef pExcepInfo As ExcepInfo, <Out()> ByRef puArgErr As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDocumentation(ByVal memid As Integer, <MarshalAs(UnmanagedType.BStr)> ByRef pBstrName As String, <MarshalAs(UnmanagedType.BStr)> ByRef pBstrDocString As String, <Out()> ByRef pdwHelpContext As UInteger, <MarshalAs(UnmanagedType.BStr)> ByRef pBstrHelpFile As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDllEntry(ByVal memid As Integer, ByVal invkind As InvokeKind, <Out(), MarshalAs(UnmanagedType.BStr)> ByRef pBstrDllName As String, <Out(), MarshalAs(UnmanagedType.BStr)> ByRef pBstrName As String, <Out()> ByVal pwOrdinal As UShort) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetRefTypeInfo(ByVal hreftype As Integer, <Out()> ByRef pTypeInfo As ITypeInfo) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function AddressOfMember(ByVal memid As Integer, ByVal invKind As InvokeKind, <Out()> ByRef ppv As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function CreateInstance(<MarshalAs(UnmanagedType.IUnknown)> ByRef pUnkOuter As Object, ByRef riid As Guid, <Out()> ByRef ppvObj As Object) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetMops(ByVal memid As Integer, <Out(), MarshalAs(UnmanagedType.BStr)> ByVal pBstrMops As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetContainingTypeLib(<Out()> ByRef ppTLib As ITypeLib, <Out()> ByVal pIndex As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ReleaseTypeAttr(ByRef typeAttr As TypeAttr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ReleaseFuncDesc(ByRef funcDesc As FuncDesc) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ReleaseVarDesc(ByRef varDesc As VarDesc) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace